package com.xiaoshou.pojo;

import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class LecturesDepartmentsRelId implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private String lecturesid;
	private String departmentsid;

	// Constructors

	/** default constructor */
	public LecturesDepartmentsRelId() {
	}

	/** full constructor */
	public LecturesDepartmentsRelId(String lecturesid, String departmentsid) {
		this.lecturesid = lecturesid;
		this.departmentsid = departmentsid;
	}

	@Column(name = "lecturesid", nullable = false, length = 40)
	public String getLecturesid() {
		return this.lecturesid;
	}

	public void setLecturesid(String lecturesid) {
		this.lecturesid = lecturesid;
	}

	@Column(name = "departmentsid", nullable = false, length = 40)
	public String getDepartmentsid() {
		return this.departmentsid;
	}

	public void setDepartmentsid(String departmentsid) {
		this.departmentsid = departmentsid;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof LecturesDepartmentsRelId))
			return false;
		LecturesDepartmentsRelId castOther = (LecturesDepartmentsRelId) other;

		return ((this.getLecturesid() == castOther.getLecturesid()) || (this
				.getLecturesid() != null && castOther.getLecturesid() != null && this
				.getLecturesid().equals(castOther.getLecturesid())))
				&& ((this.getDepartmentsid() == castOther.getDepartmentsid()) || (this
						.getDepartmentsid() != null
						&& castOther.getDepartmentsid() != null && this
						.getDepartmentsid()
						.equals(castOther.getDepartmentsid())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getLecturesid() == null ? 0 : this.getLecturesid()
						.hashCode());
		result = 37
				* result
				+ (getDepartmentsid() == null ? 0 : this.getDepartmentsid()
						.hashCode());
		return result;
	}

}